#pragma once
#include "DJoint.h"

namespace Skill
{
	namespace Ode
	{
		ref class DWorld;
		ref class DVector3;
		namespace Joints
		{
			ref class DJointGroup;
			public ref class DLinearMotor : DJoint
			{			
			public:

				///<summary>
				/// Create a new joint of the L-motor type.
				///</summary>
				///<param name = "world"> Wrold </param>
				///<param name = "group">
				/// set to null to allocate the joint normally.
				/// If it is valid the joint is allocated in the given joint group.
				///</param>
				DLinearMotor(DWorld^ world , DJointGroup^ group);


				///<summary>
				/// Gets or set the number of axes that will be controlled by the LMotor.
				/// num can range from 0 (which effectively deactivates the joint) to 3.			
				///</summary>
				VALUE_PROP_DECLARATION_GETSET(int,NumAxes);

				///<summary>
				/// Set the AMotor axes.
				///</summary>
				///<param name = "anum"> selects the axis to change (0,1 or 2).</param>
				///<param name = "rel"> Each axis can have one of three ``relative orientation'' modes 
				///  0: The axis is anchored to the global frame.
				///  1: The axis is anchored to the first body.
				///  2: The axis is anchored to the second body.
				///</param>			
				///<remarks>
				/// The axis vector is always specified in global coordinates
				/// regardless of the setting of rel.
				///</remarks>
				void SetAxis(int anum, int rel, dReal x, dReal y, dReal z);

				///<summary>
				/// Set the AMotor axes.
				///</summary>
				///<param name = "anum"> selects the axis to change (0,1 or 2).</param>
				///<param name = "rel"> Each axis can have one of three ``relative orientation'' modes 
				///  0: The axis is anchored to the global frame.
				///  1: The axis is anchored to the first body.
				///  2: The axis is anchored to the second body.
				///</param>			
				///<remarks>
				/// The axis vector is always specified in global coordinates
				/// regardless of the setting of rel.
				///</remarks>
				void SetAxis(int anum, int rel, DVector3^ axis);

				///<summary>
				/// set joint parameter
				///</summary>
				void SetParam(DJointParameters parameter, dReal value);	

				///<summary>
				/// Get joint parameter
				///</summary>
				dReal GetParam(DJointParameters parameter);						

				///<summary>
				/// Get axis.
				///</summary>
				void GetAxis(int anum, DVector3^ result);			
			};
		}
	}
}